package hk.cic.demointegrationapp;

import android.app.Application;
import android.widget.Toast;

import com.cily.utils.base.log.LogType;
import com.cily.utils.base.log.Logs;
import com.cily.utils.log.CrashHandler;
import com.cily.utils.log.DbUtils;

/**
 * user:cily
 * time:2017/7/10
 * desc:
 */

public class App extends Application {
    private static App app;

    public static App getApp(){
        return app;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        app = this;

        DbUtils.init(this, true, true);
        CrashHandler.getInstace(false).init(this);
        Logs.setLevel(LogType.ALL);
    }

    public void showToast(String str){
        Toast.makeText(this, "" + str, Toast.LENGTH_LONG).show();
    }
}
